﻿<Window x:Class="Cerebrata.CloudStorage.Utilities.FileUploader.Window1"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:WpfDataGrid="http://schemas.microsoft.com/wpf/2008/toolkit"
    Title="File Uploader Utility" Height="417.76" Width="808.985" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Icon="Azure.ico">
    <Window.Resources>

        <Storyboard x:Key="StartBusy" RepeatBehavior="Forever">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Layer_1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="45"/>

                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="45"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="90"/>

                <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="90"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="135"/>

                <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="135"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="180"/>

                <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="180"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.5000000" Value="225"/>

                <SplineDoubleKeyFrame KeyTime="00:00:01.8000000" Value="225"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.8000000" Value="270"/>

                <SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="270"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.1000000" Value="315"/>

                <SplineDoubleKeyFrame KeyTime="00:00:02.4000000" Value="315"/>
                <SplineDoubleKeyFrame KeyTime="00:00:02.4000000" Value="0"/>

            </DoubleAnimationUsingKeyFrames>

            <Int32AnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border2_Copy" Storyboard.TargetProperty="(Panel.ZIndex)">
                <SplineInt32KeyFrame KeyTime="00:00:00" Value="1"/>
                <SplineInt32KeyFrame KeyTime="00:00:02.4000000" Value="1"/>
            </Int32AnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="StopBusy">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Layer_1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
            </DoubleAnimationUsingKeyFrames>

            <Int32AnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border2_Copy" Storyboard.TargetProperty="(Panel.ZIndex)">
                <SplineInt32KeyFrame KeyTime="00:00:00" Value="0"/>
            </Int32AnimationUsingKeyFrames>
        </Storyboard>

        <Style x:Key="BarButton" TargetType="{x:Type Button}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="OnMouseEnter1">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Rectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1"/>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="OnMouseLeave1">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Rectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Grid x:Name="ButtonGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                            <Rectangle x:Name="Rectangle" StrokeThickness="0.2" Visibility="Visible" Stroke="#FF000000" Opacity="0.1">
                                <Rectangle.Fill>
                                    <LinearGradientBrush StartPoint="0.478828,-0.00246299" EndPoint="0.478828,0.968965">
                                        <GradientStop Color="#7FF8FDFE" Offset="0"/>
                                        <GradientStop Color="#7F7CE7FE" Offset="0.460177"/>
                                        <GradientStop Color="#7F00D1FF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Rectangle.Fill>
                            </Rectangle>
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True"/>
                        </Grid>
                        <ControlTemplate.Triggers>

                            <EventTrigger RoutedEvent="Mouse.MouseLeave">
                                <BeginStoryboard Storyboard="{StaticResource OnMouseLeave1}" x:Name="OnMouseLeave1_BeginStoryboard"/>
                            </EventTrigger>
                            <EventTrigger RoutedEvent="Mouse.MouseEnter">
                                <BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
                            </EventTrigger>

                        </ControlTemplate.Triggers>

                    </ControlTemplate>
                </Setter.Value>
            </Setter>

        </Style>

    </Window.Resources>

    <Grid x:Name="FileUploaderGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="35"/>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid x:Name="GridBar" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="60"/>
            </Grid.ColumnDefinitions>
            <Rectangle x:Name="Rectangle" StrokeThickness="0.2" StrokeLineJoin="Round" Stroke="#FF000000" Grid.ColumnSpan="3" >
                <Rectangle.Fill>
                    <LinearGradientBrush StartPoint="0.478828,-0.00246277" EndPoint="0.478828,0.968966">
                        <GradientStop Color="#FFF8FDFE" Offset="0"/>
                        <GradientStop Color="#FFBCEAF4" Offset="0.237443"/>
                        <GradientStop Color="#FF81D7EA" Offset="0.515982"/>
                        <GradientStop Color="#FF62C7DE" Offset="0.516363"/>
                        <GradientStop Color="#FF44B8D2" Offset="0.657534"/>
                        <GradientStop Color="#FF0B7E98" Offset="1"/>
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <Button Grid.Column="2" Content="Help" Style="{DynamicResource BarButton}" HorizontalAlignment="Stretch" x:Name="BHelp" Click="BHelp_Click" />
            <Button Content="About us" Style="{DynamicResource BarButton}" Grid.Column="1" x:Name="BAboutUs" Click="BAboutUs_Click"/>


        </Grid>
        <TabControl x:Name="FileUploaderTabControl" Margin="0,0,0,0" Grid.Row="1" FontFamily="Verdana" FontWeight="Normal" FontSize="11" BorderThickness="1,1,1,1" TabStripPlacement="Top" Panel.ZIndex="1">
            <TabItem x:Name="FileSelectionTab" Header="File Selection" FontSize="11" FontWeight="Normal" >
                <Border BorderThickness="1,1,5,5" BorderBrush="#FF44B8D2" CornerRadius="5,5,5,5" x:Name="TabBorder" RenderTransformOrigin="0.5,0.5" Opacity="1" Margin="0,0,0,0" Height="Auto" VerticalAlignment="Stretch" Background="#FFFFFFFF">
                    <Border.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Border.RenderTransform>
                    <Grid x:Name="File" ShowGridLines="False" >

                        <Grid.RowDefinitions>
                            <RowDefinition Height="40" />
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition />
                            <RowDefinition Height="30"/>
                        </Grid.RowDefinitions>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,0,0,-4" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Bottom" Width="Auto" Height="Auto">
                            <TextBlock HorizontalAlignment="Left" Margin="11,3,0,5" x:Name="fname" Width="66" Text="File name" Height="22"/>
                            <TextBox Margin="14,7,2,6" Text="" IsReadOnly="True"   x:Name="FileNameTextBox" TextChanged="FileNameTextBox_TextChanged" Height="20" Width="375" BorderThickness="1,1,1,1" VerticalAlignment="Bottom" HorizontalAlignment="Stretch"/>
                            <Button HorizontalAlignment="Left" Height="23" Width="74"  Content="Browse" x:Name="FileBrowserBtn" Click="FileBrowserBtn_Click"  />
                        </StackPanel>
                        
                        <StackPanel Grid.Row="1" Grid.RowSpan="3" x:Name="FileDelimiterStackPanel">
                            <StackPanel Grid.Row="1" Orientation="Horizontal">
                            <StackPanel Orientation="Horizontal" Grid.Row="1" x:Name="delimPanel" HorizontalAlignment="Left" Height="34" Width="256" Panel.ZIndex="0">
                                <TextBlock HorizontalAlignment="Left" Margin="10,6,0,2" Width="66" Grid.Row="1" Text="Delimiter" TextWrapping="Wrap" x:Name="delim"/>
                                <ComboBox Margin="14,5,2,7" x:Name="delimeterCbox" Width="106" HorizontalAlignment="Left"  Height="Auto" SelectionChanged="delimeterCbox_SelectionChanged"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Width="262" Margin="-1,0,0,0" Panel.ZIndex="0">
                                <TextBlock Margin="0,7,8,1" x:Name="LineFeed" Text="Line Feed Symbol" TextWrapping="Wrap" Grid.Row="1"/>
                                <ComboBox Margin="1,6,7,3" x:Name="LineFeedCbox" SelectionChanged="LineFeedCbox_SelectionChanged" HorizontalAlignment="Right" Width="106" Grid.Row="1"/>
                            </StackPanel>
                        </StackPanel>
                            <StackPanel Orientation="Horizontal" x:Name="SkipPanel" Grid.Row="2">
                            <TextBlock HorizontalAlignment="Left" Margin="10,6,0,2" x:Name="textQualifier" Width="80" Text="Text Qualifier"  Grid.Row="2"/>
                            <ComboBox Margin="0,7,8,2" x:Name="textqualifierCbox" Grid.Row="2" Width="106" HorizontalAlignment="Left" IsDropDownOpen="False" SelectionChanged="textqualifierCbox_SelectionChanged" Height="20"/>
                            <TextBlock Margin="53,8,3,0" x:Name="skip" Text="Skip Line Symbol"  Grid.Row="2"/>
                            <ComboBox Margin="7,6,7,3" x:Name="SkipLineCbox" HorizontalAlignment="Right" Width="106" Grid.Row="2" SelectionChanged="SkipLineCbox_SelectionChanged"   />
                        </StackPanel>
                            <StackPanel Orientation="Horizontal" Grid.Row="3">
                            <TextBlock HorizontalAlignment="Left" Margin="11,7,0,1" x:Name="Headercontain_" Width="123" Text="File Contains Header" TextWrapping="Wrap" Grid.Row="3"/>

                            <RadioButton Margin="1,6,0,5" Grid.Row="3" Content="Yes" GroupName="headercheck" Width="45" HorizontalAlignment="Left" x:Name="Radioyes" Click="Radioyes_Click" IsChecked="True"/>
                            <RadioButton Margin="1,6,0,5" Content="No" GroupName="headercheck" Grid.Row="3" Click="RadioNo_Click" x:Name="RadioNo"   />
                        </StackPanel>
                        </StackPanel>

                                <TextBox Margin="10,3,8,5" Grid.Row="4" Text=""  x:Name="DisplayFileTextBox1" IsReadOnly="True" BorderThickness="2,2,2,2"  VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" />
                        <Button HorizontalAlignment="Right" Margin="0,4,8,4" Width="74" Grid.Row="5" Content="Next" x:Name="next_HeaderSpecificationBtn"  Click="next_HeaderSpecificationBtn_Click" Height="Auto"/>
                    </Grid>
                </Border>
            </TabItem>
            <TabItem x:Name="HeaderSpectab" Header="Header Specification" >
                <Border BorderThickness="1,1,5,5" BorderBrush="#FF44B8D2" CornerRadius="5,5,5,5"  RenderTransformOrigin="0.5,0.5" Opacity="1" Margin="0,0,0,0" Height="Auto" VerticalAlignment="Stretch" Background="#FFFFFFFF">
                    <Border.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Border.RenderTransform>
                    <Grid x:Name="tab2" ShowGridLines="False">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="50"/>
                            <RowDefinition />
                            <RowDefinition Height="30"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="border1" Margin="3,3,3,3" Grid.Row="0" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5" BorderBrush="#FF44B8D2" >
                            <TextBlock x:Name="tab2text" TextWrapping="Wrap" Grid.Row="0" Text="Header Specification is as follows :- " FontWeight="Bold" FontFamily="Portable User Interface" FontSize="12" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                        </Border>
                        <Border x:Name="border2" Margin="3,3,3,3" Grid.Row="1" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5" BorderBrush="#FF44B8D2" Background="#FF000000" >
                            <WpfDataGrid:DataGrid x:Name="HeaderDisplayGrid" AutoGenerateColumns="False"  CanUserReorderColumns="true" CanUserSortColumns="False" CanUserResizeColumns="True" BorderBrush="#FF121C66" >
                                <WpfDataGrid:DataGrid.Columns>
                                    <WpfDataGrid:DataGridTemplateColumn Header="Header Name">
                                        <WpfDataGrid:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <TextBox Text="{Binding Path=HeaderName,Mode=TwoWay}" TextChanged="TextBox_TextChanged" />
                                            </DataTemplate>
                                        </WpfDataGrid:DataGridTemplateColumn.CellTemplate>
                                    </WpfDataGrid:DataGridTemplateColumn>
                                    <WpfDataGrid:DataGridTemplateColumn Header="Azure Data Type">
                                        <WpfDataGrid:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <ComboBox SelectedIndex="7" SelectedItem="{Binding Path=HeaderDataType, Mode=TwoWay}" Loaded="ComboBox_Loaded" SelectionChanged="ComboBox_SelectionChanged"/>
                                            </DataTemplate>
                                        </WpfDataGrid:DataGridTemplateColumn.CellTemplate>
                                    </WpfDataGrid:DataGridTemplateColumn>
                                    <WpfDataGrid:DataGridTemplateColumn Header="Import Column" >
                                        <WpfDataGrid:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate >
                                                <StackPanel HorizontalAlignment="Center">
                                                    <CheckBox  IsThreeState="False" IsChecked="{Binding Path=ToBeImported, Mode=TwoWay}" Click="CheckBox_Click"   />
                                                </StackPanel>
                                            </DataTemplate>
                                        </WpfDataGrid:DataGridTemplateColumn.CellTemplate>
                                    </WpfDataGrid:DataGridTemplateColumn>
                                </WpfDataGrid:DataGrid.Columns>
                            </WpfDataGrid:DataGrid>
                        </Border>
                        <Button HorizontalAlignment="Right" Margin="0,4,8,4" Width="74" Grid.Row="2" Content="Next" x:Name="next_DataPresentation" Click="next_DataPresentation_Click" />
                    </Grid>
                </Border>
            </TabItem>
            <TabItem Header="Data Presentation" x:Name="Datatab" >
                <Border BorderThickness="1,1,5,5" BorderBrush="#FF44B8D2" CornerRadius="5,5,5,5"  RenderTransformOrigin="0.5,0.5" Opacity="1" Margin="0,0,0,0" Height="Auto" VerticalAlignment="Stretch" Background="#FFFFFFFF">
                    <Border.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Border.RenderTransform>
                    <Grid  Height="Auto" x:Name="dataTabGrid">

                        <Grid.RowDefinitions>
                            <RowDefinition Height="50"/>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="30"/>
                        </Grid.RowDefinitions>

                        <Border x:Name="DataBorder1" Margin="3,3,3,3" Grid.Row="0" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5" BorderBrush="#FF44B8D2" >
                            <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Height="Auto">
                                <TextBlock Text="Sample Data" Width="Auto" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="Auto" FontWeight="Bold" FontFamily="Portable User Interface" FontSize="12"/>
                            </StackPanel>
                        </Border>
                        <Border x:Name="border3"  Margin="3,3,3,3" Grid.Row="1" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5" BorderBrush="#FF44B8D2" >

                            <WpfDataGrid:DataGrid x:Name="DataDisplayGrid" IsReadOnly="True"  CanUserSortColumns="False" />

                        </Border>
                        <Button HorizontalAlignment="Right" Margin="0,4,8,4" Width="74" Grid.Row="2" Content="Next"  x:Name="next_ConfigurationTab" Click="next_ConfigurationTab_Click" />





                    </Grid>
                </Border>



            </TabItem>
            <TabItem Header="Azure Configuration" x:Name="Configuration" >
                <Border BorderThickness="1,1,5,5" BorderBrush="#FF44B8D2" CornerRadius="5,5,5,5"  RenderTransformOrigin="0.5,0.5" Opacity="1" Margin="0,0,0,0" Height="Auto" VerticalAlignment="Stretch" Background="#FFFFFFFF">
                    <Border.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Border.RenderTransform>


                    <Grid x:Name="ConfigureTab" ShowGridLines="False">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition/>
                            <RowDefinition Height="30"/>

                        </Grid.RowDefinitions>




                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="168.127"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>


                        <StackPanel Margin="0,1,-5,1" Grid.Row="4" x:Name="ConfigPanel2" Orientation="Horizontal" RenderTransformOrigin="0.554,0.464" Grid.ColumnSpan="2">
                            <TextBlock Height="16" HorizontalAlignment="Right" x:Name="tb2" VerticalAlignment="Top" Width="107" Text="Enter Partition Key" TextWrapping="Wrap" Margin="60,9,1,0"/>
                            <TextBox Height="Auto" x:Name="PartitionBox" Width="150" BorderThickness="1,1,1,1" TextWrapping="NoWrap"  Panel.ZIndex="1" Margin="0,0,0,0" TextChanged="PartitionBox_TextChanged" HorizontalAlignment="Left" VerticalAlignment="Center" TabIndex="4"/>
                        </StackPanel>

                        <StackPanel Margin="0,1,-5,-2" Grid.Row="5" x:Name="ConfigPanel3" Orientation="Horizontal" Grid.RowSpan="2" Grid.ColumnSpan="2">
                            <Grid x:Name="RadioGrid" ShowGridLines="False" Width="500" >
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="30"/>
                                    <RowDefinition Height="30"/>
                                    <RowDefinition Height="30"/>
                                    <RowDefinition Height="30"/>
                                    <RowDefinition Height="30"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="0.46*"/>
                                    <ColumnDefinition Width="0.366*"/>
                                    <ColumnDefinition Width="0.174*"/>

                                </Grid.ColumnDefinitions>
                                <TextBlock Height="18" HorizontalAlignment="Left" Margin="57,7,12,0" x:Name="tb3" VerticalAlignment="Top" Width="111" Text="Select the Row Key" TextWrapping="Wrap"/>
                                <RadioButton Grid.Row="0" Grid.Column="1" x:Name="GuidKeyRadioBtn" IsChecked="true"  Content="Guid Key (System.Guid)" GroupName="RowKeyRadioBtn" Margin="-62,7,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="171" Height="20" BorderThickness="0,1,1,1" Click="GuidKeyRadioBtn_Click" TabIndex="5"/>
                                <RadioButton Grid.Row="1" x:Name="SeqKeyRadioBtn" Unchecked="SeqKeyRadioBtn_Unchecked"  Checked="SeqKeyRadioBtn_Checked" Content="Sequential Key" GroupName="RowKeyRadioBtn" Margin="-63,7,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="130" Grid.Column="1" Click="SeqKeyRadioBtn_Click" d:LayoutOverrides="HorizontalAlignment" TabIndex="6"/>
                                <RadioButton Grid.Row="2" x:Name="HeaderKeyRadioBtn" Checked="HeaderKeyRadioBtn_Checked" Unchecked="HeaderKeyRadioBtn_Unchecked" Content="Header Key" GroupName="RowKeyRadioBtn" Margin="0,7,-26,0" HorizontalAlignment="Right" VerticalAlignment="Top" Width="87" Click="HeaderKeyRadioBtn_Click" TabIndex="9"/>
                                <RadioButton Grid.Row="3" Grid.Column="1" x:Name="TicksRadioBtn" Content="Ticks (DateTime.Now.Ticks)" GroupName="RowKeyRadioBtn" Margin="-62,8,57,0" VerticalAlignment="Top" Click="TicksRadioBtn_Click" TabIndex="12" />


                                <StackPanel Margin="-75,2,-27,1" x:Name="SequentialKeyStackPanel" Grid.Row="1" Grid.Column="2" Orientation="Vertical" Opacity="0" Grid.RowSpan="2" HorizontalAlignment="Left" VerticalAlignment="Top">
                                    <Border BorderBrush="#FF44B8D2" BorderThickness="2,2,2,2"  CornerRadius="5,5,5,5" Width="183" >
                                        <StackPanel>
                                            <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left">
                                                <TextBlock Height="18" HorizontalAlignment="Left"  Margin="6,6,2,0" x:Name="SeqNoTb" VerticalAlignment="Top" Width="100" Text="Starting number" />
                                                <TextBox IsEnabled="False" Height="21" x:Name="SeqKeyTBox" TextChanged="SeqKeyTBox_TextChanged"  Width="61" BorderThickness="1,1,1,1" Text="0" TextWrapping="NoWrap" Panel.ZIndex="1" Margin="0,0,0,0" TabIndex="7"/>
                                            </StackPanel>
                                            <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="2">
                                                <TextBlock Height="18" HorizontalAlignment="Left"  Margin="21,7,9,0" x:Name="SeqNoincrementTblk" VerticalAlignment="Top" Width="78" Text="Increment By" />
                                                <TextBox IsEnabled="False" Height="21" x:Name="SeqKeyIncrementTBox" Width="41" BorderThickness="1,1,1,1" Text="1" TextWrapping="Wrap" TextChanged="SeqKeyIncrementTBox_TextChanged" Panel.ZIndex="1" Margin="0,3,0,0" TabIndex="8"/>
                                            </StackPanel>
                                        </StackPanel>
                                    </Border>
                                </StackPanel>

                                <StackPanel Margin="-72,2,-445,1" Grid.Row="2" Grid.Column="2" Grid.RowSpan="3"  x:Name="HeaderKeyStackPanel" Orientation="Vertical" Opacity="0" HorizontalAlignment="Left">

                                    <Border BorderBrush="#FF44B8D2" BorderThickness="2,2,2,2"  CornerRadius="5,5,5,5" >
                                        <StackPanel>
                                            <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="2" Grid.ColumnSpan="2" Margin="-6,0,0,0" Opacity="1" >
                                                <TextBlock Height="18" HorizontalAlignment="Left"  Margin="10,5,0,0" x:Name="HeaderKeyTb" VerticalAlignment="Top" Width="80" Text="Header Name" />
                                                <ComboBox IsEnabled="False"  x:Name="HeaderNameCbox" SelectionChanged="HeaderNameCbox_SelectionChanged" TabIndex="10"  />
                                            </StackPanel>
                                            <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.Column="2" Margin="0,5,0,0">
                                                <TextBlock Height="18" HorizontalAlignment="Left"  Margin="4,7,3,0" x:Name="ImportRegularHeadertblock" VerticalAlignment="Top" Width="158" Text="Import as a Regular Header" Panel.ZIndex="1" />
                                                <CheckBox IsEnabled="False" Height="19" x:Name="ImportRegularHeaderChkBox" Width="21" BorderThickness="1,1,1,1" Click="ImportRegularHeaderChkBox_Click"  Margin="-3,8,0,0" TabIndex="11"/>
                                            </StackPanel>
                                        </StackPanel>
                                    </Border>




                                </StackPanel>


                            </Grid>

                        </StackPanel>

                        <Button HorizontalAlignment="Right" Margin="0,4,8,4" Width="74" Grid.Row="6" Content="Next"  x:Name="next_EavGeneration" Click="next_EavGeneration_Click" Grid.Column="1" TabIndex="13" />
                        <TextBlock HorizontalAlignment="Right" Margin="0,0,3,0" VerticalAlignment="Center" Grid.Row="1" Text="Account Name" TextWrapping="Wrap"/>
                        <TextBlock HorizontalAlignment="Right" Margin="0,0,0,0" VerticalAlignment="Center" Width="73.34" Grid.Row="2" Text="Account Key" TextWrapping="Wrap"/>
                        <TextBlock HorizontalAlignment="Right" Margin="0,0,3,0" VerticalAlignment="Center" Grid.Row="3" Text="Table Name" TextWrapping="Wrap"/>
                        <TextBox HorizontalAlignment="Left" Margin="0,0,0,0" x:Name="AccountNameTBox" Width="150" Grid.Column="1" Grid.Row="1" Text="" TextWrapping="NoWrap" d:LayoutOverrides="Height" VerticalAlignment="Center" TabIndex="1"/>
                        <TextBox HorizontalAlignment="Left" Margin="0,0,0,0" Width="405" Grid.Column="1" Grid.Row="2" Text="" TextWrapping="NoWrap" x:Name="AccountKeyTBox" VerticalAlignment="Center" TabIndex="2"/>
                        <TextBox HorizontalAlignment="Left" Margin="0,0,0,0" Width="150" Grid.Column="1" Grid.Row="3" Text="" TextWrapping="NoWrap" x:Name="TableNameTBox" VerticalAlignment="Center" TabIndex="3"/>
                        <TextBlock Margin="156.373,7.63,0,7.37" Grid.Column="1" Grid.Row="3" Text="Table must exist in the specified Azure storage." TextWrapping="NoWrap" FontWeight="Bold" FontSize="11" Foreground="#FFCC2828" Height="15" Width="320" HorizontalAlignment="Left" VerticalAlignment="Center"/>


                    </Grid>
                </Border>
            </TabItem>
            <TabItem Header="EAV Generation" x:Name="EavTab">
                <Border BorderThickness="1,1,5,5" BorderBrush="#FF44B8D2" CornerRadius="5,5,5,5"  RenderTransformOrigin="0.5,0.5" Opacity="1" Margin="0,0,0,0" Height="Auto" VerticalAlignment="Stretch" Background="#FFFFFFFF">
                    <Border.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Border.RenderTransform>
                    <Grid x:Name="Eavtab" ShowGridLines="False">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="105.63"/>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="30"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="Eavborder1" Margin="3,3,3,3" Grid.Row="0" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5" BorderBrush="#FF44B8D2" >
                            <Grid ShowGridLines="False">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="20"></RowDefinition>
                                    <RowDefinition Height="25"></RowDefinition>
                                    <RowDefinition Height="25"></RowDefinition>
                                    <RowDefinition Height="25"></RowDefinition>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="0.132*"></ColumnDefinition>
                                    <ColumnDefinition Width="0.868*"></ColumnDefinition>
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Account Name" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,1,0,1"></TextBlock>
                                <TextBox Grid.Row="1" x:Name="EavTab_AccountNameTbox" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Width="300" Margin="2,1,0,1" IsReadOnly="True" ></TextBox>
                                <TextBlock Text="Account Key" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,1,0,1"></TextBlock>
                                <TextBox Grid.Row="2" x:Name="EavTab_AccountKeyTbox" Grid.Column="1" Margin="2,1,108,1" Text="" IsReadOnly="True" ></TextBox>
                                <TextBlock Text="Table Name" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,1,0,1"></TextBlock>
                                <TextBox Grid.Row="3" x:Name="EavTab_TableNameTbox" Grid.Column="1" Width="300" HorizontalAlignment="Left" Margin="2,1,0,1" IsReadOnly="True" ></TextBox>

                                <TextBlock x:Name="EavTextBlock1" Grid.Row="0" Grid.ColumnSpan="2" Text="Summary: " HorizontalAlignment="Left" VerticalAlignment="Bottom" FontWeight="Bold" FontFamily="Portable User Interface" FontSize="12"/>
                            </Grid>
                        </Border>
                        <Border x:Name="Eavborder2" Margin="3,3,3,3" Grid.Row="1" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5" BorderBrush="#FF44B8D2" >
                            <WpfDataGrid:DataGrid x:Name="EavDisplayGrid" IsReadOnly="True"  CanUserSortColumns="False" />
                        </Border>
                        <Button HorizontalAlignment="Right" Grid.Row="2" Margin="0,4,90,4" Width="74" Content="Start Over" x:Name="Start_OverEavTab" Click="Start_Over_Click"  IsEnabled="False" VerticalAlignment="Center" BorderThickness="0,10,0,0" Height="21.37" Grid.Column="5" />
                        <Button HorizontalAlignment="Right" Margin="0,4,8,4" Width="74" Grid.Row="2" Content="Upload" x:Name="NextBtn_UploadXml"  Click="NextBtn_UploadXml_Click" />


                    </Grid>

                </Border>




            </TabItem>
            <TabItem Header="Upload" x:Name="UploadTab">
                <Border BorderThickness="1,1,5,5" BorderBrush="#FF44B8D2" CornerRadius="5,5,5,5"  RenderTransformOrigin="0.5,0.5" Opacity="1" Margin="0,0,0,0" Height="Auto" VerticalAlignment="Stretch" Background="#FFFFFFFF">
                    <Border.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                            <SkewTransform AngleX="0" AngleY="0"/>
                            <RotateTransform Angle="0"/>
                            <TranslateTransform X="0" Y="0"/>
                        </TransformGroup>
                    </Border.RenderTransform>

                    <Grid x:Name="UploadGrid" ShowGridLines="False">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="50"/>
                            <RowDefinition />
                            <RowDefinition Height="30"/>
                        </Grid.RowDefinitions>
                        <Border x:Name="Uploadborder1" Margin="3,3,3,3" Grid.Row="0" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5" BorderBrush="#FF44B8D2" >
                            <TextBlock x:Name="UploadTextBlock1" Grid.Row="0" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" FontFamily="Portable User Interface" FontSize="16" Width="270"/>

                        </Border>
                        <Border x:Name="Uploadborder2" Margin="3,3,3,3" Grid.Row="1" BorderThickness="2,2,2,2" CornerRadius="5,5,5,5" BorderBrush="#FF44B8D2" >
                            <WpfDataGrid:DataGrid  x:Name="UploadDisplayGrid" IsReadOnly="True"   VerticalScrollBarVisibility="Visible" />
                        </Border>

                        <Grid Grid.Row="2" ShowGridLines="False">
                            <Grid.RowDefinitions>
                                <RowDefinition></RowDefinition>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="123" ></ColumnDefinition>
                                <ColumnDefinition Width="140" ></ColumnDefinition>
                                <ColumnDefinition Width="94*"/>
                                <ColumnDefinition Width="175.66" />
                                <ColumnDefinition Width="147.071" ></ColumnDefinition>
                                <ColumnDefinition Width="82.254" ></ColumnDefinition>

                            </Grid.ColumnDefinitions>
                            <ProgressBar x:Name="UploadProgressBar" Grid.Row="0" Margin="-56,5,0,6" Grid.Column="1" BorderThickness="1,1,1,1" />
                            <TextBlock Text="Processing..." TextWrapping="Wrap" x:Name="ProgressTBox" Margin="101,8,23,9" d:LayoutOverrides="GridBox" Grid.ColumnSpan="2"/>
                            <Button Margin="2,4,2.583,4" Content="Launch Cloud Storage Studio" d:LayoutOverrides="Height" BorderThickness="18,0,0,0" x:Name="LaunchCloudStorageBtn" Grid.Column="3" Click="LaunchCloudStorageBtn_Click" />
                            <Button HorizontalAlignment="Left" Margin="0,4,0,4" Width="142" Content="View Failed Records" Click="go_BackBtn_Click" x:Name="go_BackBtn" IsEnabled="False" VerticalAlignment="Center" Height="21.37" Grid.Column="4" />
                            <Button HorizontalAlignment="Left" Margin="0,4,0,4" Width="74" Content="Start Over" x:Name="Start_Over" Click="Start_Over_Click"  IsEnabled="False" VerticalAlignment="Center" BorderThickness="0,10,0,0" Height="21.37" Grid.Column="5" />
                        </Grid>


                    </Grid>
                </Border>

            </TabItem>
        </TabControl>

        <Border BorderThickness="1,1,5,5" BorderBrush="{x:Null}" CornerRadius="5,5,5,5" x:Name="border2_Copy" RenderTransformOrigin="0.5,0.5" Opacity="0.5" Width="Auto" HorizontalAlignment="Stretch" Height="Auto" VerticalAlignment="Stretch" Background="#FFFFFFFF" Margin="0,0,0,0" Panel.ZIndex="0" Grid.Row="1" Grid.Column="1">
            <Border.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="1" ScaleY="1"/>
                    <SkewTransform AngleX="0" AngleY="0"/>
                    <RotateTransform Angle="0"/>
                    <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
            </Border.RenderTransform>
            <Canvas x:Name="Layer_1" Width="157" Height="157" Canvas.Left="0" Canvas.Top="0" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Opacity="0.995">
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform ScaleX="1" ScaleY="1"/>
                        <SkewTransform AngleX="0" AngleY="0"/>
                        <RotateTransform Angle="0"/>
                        <TranslateTransform X="0" Y="0"/>
                    </TransformGroup>
                </Canvas.RenderTransform>
                <Canvas Width="156.165" Height="156.167">
                    <Path x:Name="Path" Width="16.6243" Height="62.2988" Canvas.Left="69.6029" Canvas.Top="1.52588e-005" Stretch="Fill" Fill="#FF60C3FE" Data="F1 M 86.2271,31.4012C 86.2271,18.4445 82.8743,6.98193 77.7339,1.52588e-005C 72.7987,7.02213 69.6029,18.2478 69.6029,30.8977C 69.6029,43.8544 72.9556,55.3169 78.0961,62.2988C 83.0313,55.2767 86.2271,44.0511 86.2271,31.4012 Z "/>
                    <Path x:Name="Path_0" Width="43.7936" Height="44.3102" Canvas.Left="89.253" Canvas.Top="22.6206" Stretch="Fill" Fill="#FF4ABBFF" Data="F1 M 116.85,50.831C 126.011,41.6687 131.745,31.1925 133.047,22.6206C 124.592,24.0967 114.394,29.7751 105.45,38.7204C 96.2887,47.8826 90.5548,58.3589 89.253,66.9308C 97.7081,65.4547 107.905,59.7763 116.85,50.831 Z "/>
                    <Path x:Name="Path_1" Width="62.298" Height="16.6255" Canvas.Left="93.8675" Canvas.Top="69.5108" Stretch="Fill" Fill="#FF33B2FE" Data="F1 M 124.781,86.1362C 137.738,86.1108 149.194,82.7356 156.165,77.5816C 149.134,72.6601 137.902,69.4862 125.252,69.511C 112.295,69.5364 100.839,72.9116 93.8675,78.0657C 100.899,82.9871 112.131,86.161 124.781,86.1362 Z "/>
                    <Path x:Name="Path_2" Width="44.3958" Height="43.7068" Canvas.Left="89.2574" Canvas.Top="89.2317" Stretch="Fill" Fill="#FF00A0FF" Data="F1 M 105.411,116.797C 114.591,125.94 125.079,131.654 133.653,132.938C 132.161,124.486 126.462,114.3 117.499,105.373C 108.319,96.23 97.8317,90.5166 89.2574,89.2317C 90.75,97.6838 96.4484,107.87 105.411,116.797 Z "/>
                    <Path x:Name="Path_3" Width="16.6234" Height="62.2996" Canvas.Left="69.8085" Canvas.Top="93.8679" Stretch="Fill" Fill="#FFD5EFFF" Data="F1 M 69.8088,124.743C 69.7727,137.699 73.0935,149.171 78.2145,156.167C 83.1692,149.159 86.3963,137.942 86.4316,125.293C 86.4676,112.336 83.1468,100.864 78.0258,93.8679C 73.0711,100.876 69.844,112.093 69.8088,124.743 Z "/>
                    <Path x:Name="Path_4" Width="43.9168" Height="44.1881" Canvas.Left="22.9649" Canvas.Top="89.2049" Stretch="Fill" Fill="#FFB8E4FF" Data="F1 M 39.2404,105.228C 30.0536,114.365 24.2905,124.825 22.9649,133.393C 31.424,131.94 41.6371,126.29 50.6063,117.37C 59.7931,108.233 65.5562,97.7731 66.8818,89.2049C 58.4227,90.6575 48.2096,96.3075 39.2404,105.228 Z "/>
                    <Path x:Name="Path_5" Width="62.2993" Height="16.626" Canvas.Left="7.7486e-007" Canvas.Top="69.4623" Stretch="Fill" Fill="#FF98D8FF" Data="F1 M 31.4857,69.4662C 18.5296,69.3348 7.0337,72.5711 7.7486e-007,77.6404C 6.97171,82.6466 18.1644,85.9562 30.8136,86.0845C 43.7697,86.2159 55.2656,82.9795 62.2993,77.9102C 55.3276,72.904 44.1349,69.5945 31.4857,69.4662 Z "/>
                    <Path x:Name="Path_6" Width="43.8637" Height="44.2408" Canvas.Left="23.1804" Canvas.Top="22.5599" Stretch="Fill" Fill="#FF7ACDFF" Data="F1 M 51.2251,39.0422C 42.1562,29.7884 31.7387,23.9485 23.1804,22.5599C 24.5707,31.0295 30.1454,41.2838 38.9995,50.3185C 48.0684,59.5723 58.486,65.4122 67.0442,66.8007C 65.6539,58.3312 60.0792,48.0768 51.2251,39.0422 Z "/>
                </Canvas>
            </Canvas>
        </Border>


    </Grid>
</Window>
